<template>
  <div class="preview_container">
    <div class="preview_top">
      <div class="preview_title">
        {{ pageInfo.pageBaseInfo.title || "页面名称" }}
      </div>
    </div>
    <div v-for="(item, index) in components" :key="index">
      <component v-bind="item" v-bind:is="item.type"> </component>
    </div>
  </div>
</template>

<script>
import Picture from "@/components/Element/Picture/Picture";
import Search from "@/components/Element/Search/Search";
import Carousel from "@/components/Element/Carousel/Carousel";
import Texts from "@/components/Element/Text/Text";
import Title from "@/components/Element/Title/Title";
import { mapState } from "vuex";
export default {
  data() {
    return {};
  },
  computed: {
    ...mapState(["components", "pageInfo",'']),
  },
  components: {
    Picture,
    Search,
    Carousel,
    Texts,
    Title,
  },
};
</script>

<style lang="scss" scoped>
.preview_container {
  width: 750px;
  margin: 0 auto;
}
</style>